﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 入库单基础输入参数
/// </summary>
public class inbounrdeceiptBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>
    public virtual long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public virtual string? materialName { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    public virtual long? supplierName { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public virtual int? currentStock { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public virtual int? inboundQty { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    public virtual DateTime? inboundDate { get; set; }
    
    /// <summary>
    /// 质检状态
    /// </summary>
    public virtual bool? qcstatus { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    public virtual string? location { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? comments { get; set; }
    
}

/// <summary>
/// 入库单分页查询输入参数
/// </summary>
public class PageinbounrdeceiptInput : BasePageInput
{
    /// <summary>
    /// 物料编码
    /// </summary>
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public string? materialName { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    public long? supplierName { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public int? inboundQty { get; set; }
    
    /// <summary>
    /// 入库日期范围
    /// </summary>
     public DateTime?[] inboundDateRange { get; set; }
    
    /// <summary>
    /// 质检状态
    /// </summary>
    public bool? qcstatus { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    public string? location { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? comments { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 入库单增加输入参数
/// </summary>
public class AddinbounrdeceiptInput
{
    /// <summary>
    /// 物料编码
    /// </summary>
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "物料名称字符长度不能超过32")]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    public long? supplierName { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public int? inboundQty { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    public DateTime? inboundDate { get; set; }
    
    /// <summary>
    /// 质检状态
    /// </summary>
    public bool? qcstatus { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    [MaxLength(32, ErrorMessage = "存放位置字符长度不能超过32")]
    public string? location { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? comments { get; set; }
    
}

/// <summary>
/// 入库单删除输入参数
/// </summary>
public class DeleteinbounrdeceiptInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 入库单更新输入参数
/// </summary>
public class UpdateinbounrdeceiptInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>    
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "物料名称字符长度不能超过32")]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>    
    public long? supplierName { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>    
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>    
    public int? inboundQty { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>    
    public DateTime? inboundDate { get; set; }
    
    /// <summary>
    /// 质检状态
    /// </summary>    
    public bool? qcstatus { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>    
    [MaxLength(32, ErrorMessage = "存放位置字符长度不能超过32")]
    public string? location { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? comments { get; set; }
    
}

/// <summary>
/// 入库单主键查询输入参数
/// </summary>
public class QueryByIdinbounrdeceiptInput : DeleteinbounrdeceiptInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDatainbounrdeceiptInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 入库单数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportinbounrdeceiptInput : BaseImportInput
{
    /// <summary>
    /// 物料编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料编码 文本
    /// </summary>
    [ImporterHeader(Name = "物料编码")]
    [ExporterHeader("物料编码", Format = "", Width = 25, IsBold = true)]
    public string materialCodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [ImporterHeader(Name = "物料名称")]
    [ExporterHeader("物料名称", Format = "", Width = 25, IsBold = true)]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 供应商名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? supplierName { get; set; }
    
    /// <summary>
    /// 供应商名称 文本
    /// </summary>
    [ImporterHeader(Name = "供应商名称")]
    [ExporterHeader("供应商名称", Format = "", Width = 25, IsBold = true)]
    public string supplierNameFkDisplayName { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    [ImporterHeader(Name = "当前库存量")]
    [ExporterHeader("当前库存量", Format = "", Width = 25, IsBold = true)]
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    [ImporterHeader(Name = "入库数量")]
    [ExporterHeader("入库数量", Format = "", Width = 25, IsBold = true)]
    public int? inboundQty { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    [ImporterHeader(Name = "入库日期")]
    [ExporterHeader("入库日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? inboundDate { get; set; }
    
    /// <summary>
    /// 质检状态
    /// </summary>
    [ImporterHeader(Name = "质检状态")]
    [ExporterHeader("质检状态", Format = "", Width = 25, IsBold = true)]
    public bool? qcstatus { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    [ImporterHeader(Name = "存放位置")]
    [ExporterHeader("存放位置", Format = "", Width = 25, IsBold = true)]
    public string? location { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? comments { get; set; }
    
}
